<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<title>动态页面</title>
		<link href="/static/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="/static/include/css/style.css">
	</head>
	<body class="white-bg" style="height: 95%">

		<form class="form-horizontal m" id="editForm">
			<input type="hidden" id="id" name="id" field="id" />
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">名称1：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name" field="name" maxlength="50" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">编码1：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="code" id="code" field="code" maxlength="20" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">年纪1：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="age" field="age" maxlength="3" required>
				</div>
			</div>
		</form>


		<script src="/static/include/js/footer.js"></script>
		<script>
			$(function() {
				//渲染表单
				var id = getQueryString('id')
				if (!id) return
				$.ajax({
					url: api + '/scabpm/demo/get?id=' + id,
					type: 'get',
					success: function(res) {
						var result;
						if (typeof res == 'string')
							result = JSON.parse(res)
						else
							result = res;
						applyDrawing('#editForm', result.data)
					}
				});
			})

			function getData() {
				if ($.validate.form()) {
					// $.common.ajaxCommitForm($('#editForm'),false);
					var data = $.param2Json($('#editForm').serializeArray())
					return data;
				} else {
					return false
				}
			}
		</script>
	</body>
</html>
